From 5ee4989714480833d15c1222ebfd7924209afdf0 Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 3 Nov 1999 22:27:59 +0000 Subject: [PATCH] Remove dependency on lib*gif!!!! 1999-11-03 Jonathan Blandford * src/Makefile.am (libpixbuf_gif_la_LIBADD): Remove dependency on lib*gif!!!! Also, some code cleanups to io-gif --- gdk-pixbuf/ChangeLog | 5 +++++ gdk-pixbuf/Makefile.am | 2 +- gdk-pixbuf/io-gif.c | 26 ++++---------------------- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/gdk-pixbuf/ChangeLog b/gdk-pixbuf/ChangeLog index 599fd77b10..2235588b16 100644 --- a/gdk-pixbuf/ChangeLog +++ b/gdk-pixbuf/ChangeLog @@ -1,3 +1,8 @@ +1999-11-03 Jonathan Blandford + + * src/Makefile.am (libpixbuf_gif_la_LIBADD): Remove dependency on + lib*gif!!!! + 1999-11-03 Michael Fulbright * src/io-jpeg.c (image_load_increment): Further removal of diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am index 63fdd512b6..aab49a551e 100644 --- a/gdk-pixbuf/Makefile.am +++ b/gdk-pixbuf/Makefile.am @@ -87,7 +87,7 @@ libpixbuf_xpm_la_LDFLAGS = -avoid-version -module # libpixbuf_gif_la_SOURCES = io-gif.c libpixbuf_gif_la_LDFLAGS = -avoid-version -module -libpixbuf_gif_la_LIBADD = $(LIBGIF) +libpixbuf_gif_la_LIBADD = # # The TIFF loader diff --git a/gdk-pixbuf/io-gif.c b/gdk-pixbuf/io-gif.c index 80a6c97189..630672f7b9 100644 --- a/gdk-pixbuf/io-gif.c +++ b/gdk-pixbuf/io-gif.c @@ -5,7 +5,7 @@ * * Authors: Jonathan Blandford * Adapted from the gimp gif filter written by Adam Moss - * Gimp work based on earlier work by ...... + * Gimp work based on earlier work. * Permission to relicense under the LGPL obtained. * * This library is free software; you can redistribute it and/or @@ -34,11 +34,6 @@ #define MAXCOLORMAPSIZE 256 - -#define CM_RED 0 -#define CM_GREEN 1 -#define CM_BLUE 2 - #define MAX_LZW_BITS 12 #define INTERLACE 0x40 @@ -46,12 +41,8 @@ #define BitSet(byte, bit) (((byte) & (bit)) == (bit)) #define LM_to_uint(a,b) (((b)<<8)|(a)) -#define GRAYSCALE 1 -#define COLOR 2 - typedef unsigned char CMap[3][MAXCOLORMAPSIZE]; - /* Possible states we can be in. */ enum { GIF_START, @@ -72,9 +63,6 @@ typedef struct _Gif89 Gif89; struct _Gif89 { int transparent; - int delay_time; - int input_flag; - int disposal; }; typedef struct _GifContext GifContext; @@ -88,7 +76,6 @@ struct _GifContext unsigned int color_resolution; unsigned int background; unsigned int aspect_ratio; - int gray_scale; GdkPixbuf *pixbuf; Gif89 gif89; @@ -248,16 +235,14 @@ gif_get_colormap (GifContext *context) return -1; } - context->color_map[CM_RED][context->colormap_index] = rgb[0]; - context->color_map[CM_GREEN][context->colormap_index] = rgb[1]; - context->color_map[CM_BLUE][context->colormap_index] = rgb[2]; + context->color_map[0][context->colormap_index] = rgb[0]; + context->color_map[1][context->colormap_index] = rgb[1]; + context->color_map[2][context->colormap_index] = rgb[2]; context->colormap_flag &= (rgb[0] == rgb[1] && rgb[1] == rgb[2]); context->colormap_index ++; } - context->gray_scale = (context->colormap_flag) ? GRAYSCALE : COLOR; - return 0; } @@ -327,9 +312,6 @@ gif_get_extension (GifContext *context) retval = get_data_block (context, (unsigned char *) context->block_buf, NULL); if (retval != 0) return retval; - context->gif89.disposal = (context->block_buf[0] >> 2) & 0x7; - context->gif89.input_flag = (context->block_buf[0] >> 1) & 0x1; - context->gif89.delay_time = LM_to_uint (context->block_buf[1], context->block_buf[2]); if (context->pixbuf == NULL) { /* I only want to set the transparency if I haven't * created the pixbuf yet. */ -- 2.30.2